<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions"%>
<c:set var="ctx" value="${pageContext.request.contextPath}"/>
<!DOCTYPE html>
<html>
<head>
	<jsp:include page="../inc_bootstrap.jsp"></jsp:include>
	<link href="${ctx}/css/common.css" rel="stylesheet" type="text/css" />
	<link href="${ctx}/css/login.css" rel="stylesheet" type="text/css" />
	<title>公告</title>
	<style>
		/*添加按钮*/
		.query{
			line-height:25px;
		}

	</style>
	<script type="text/javascript">

		$(function() {
			//先销毁表格
			$('#bootTable').bootstrapTable({
				url: "${ctx}/notice/noticePage",
				dataType: "json",
				method: 'get',
				cache: false,
				height: "auto",//
				striped: true,
				pagination: true,
				pageSize: 20,
				pageNumber:1,
				pageList: [10, 20, 50, 100, 200, 500],
				search: true,
				showColumns: true,
				showRefresh: true,
				clickToSelect: true,
				idField:'id',
				paginationHAlign: 'left',
				paginationDetailHAlign: 'right',
				sidePagination: "server", //表示服务端请求
				queryParamsType : "undefined",
				columns: [{field:"chk",checkbox:true},
					{field:"id",title:"",align:"left",valign:"middle",sortable:"true",visible:false},
					{field:"title",title:"标题",align:"left",valign:"middle",sortable:"true",
						formatter: function(value, row, index) {
							var str = '<a href="${ctx}/notice/outer/'+row.id+'">'+row.title+'</a>';
							return str;
						}
					},
					{field:"createTime",title:"创建时间",align:"left",valign:"middle",sortable:"true"},
					{field:"createName",title:"创建人",align:"left",valign:"middle"}
				],
				onPageChange: function (size, number) {
					//$("#pageSizeInput").val(size);
					//$("#pageNumberInput").val(number);
					//var form = $('#tableForm');
					//form.action= '${base}/showReport';
					//form.submit();
				},
				onSort: function (name, order) {
				},
// 			formatShowingRows: function (pageFrom, pageTo, totalRows) {
// 				return '';
//             },
// 			formatRecordsPerPage: function () {
// 				return '';
//             },
				formatNoMatches: function(){
					return '无符合条件的记录';
				}
			});
		});

	</script>
</head>
<body >
<div class="remindBox">
	<div class="remind1">登录</div>
</div>
<div class="navBox">
	<ul class="nav">
		<a href="${ctx }/admin/index"><li class="logo"><img src="${ctx }/image/nav1.gif"></li></a>
		<li class="specLi"><img src="${ctx}/image/nav2.gif"></li>
		<li class="specLi nav2"><img src="${ctx}/image/nav3.gif"></li>
	</ul>
</div>
<div id="content" class="divBox">
	<table id="bootTable" class="table-striped"></table>
</div>
</body>
</html>